package main

import "fmt"

/* func main() {
	a := 10
	b := &a
	fmt.Printf("a:%d ptr:%p\n", a, &a) // a:10 ptr:0xc00001a078
	fmt.Printf("b:%p type:%T\n", b, b) // b:0xc00001a078 type:*int
	fmt.Println(&b)                    // 0xc00000e018
}
*/

/*  func main() {
	a := 10
	b := &a
	fmt.Printf("a:%d prt:%p \n", a, &a)
	fmt.Printf("b:%p type:%T \n", b, b)
	fmt.Println(&b)
} */

/* func main() {
	// var a *int
	// *a = 100
	// fmt.Println(*a)

	var b map[string]int
	b["沙河娜扎"] = 100
	fmt.Println(b)
} */

func main() {
	i := 1
	modify1(i)

	fmt.Println(i)

	modify2(&i)

	fmt.Println(i)
}

func modify1(x int) {
	x = 100
}

func modify2(x *int) {
	*x = 100
}
